<template>
	<view class="selectDoctor-Header">
		<image :src="`${prefix_image}/homepage/IntegralRecord/selectDoctor.png`" mode="aspectFill" />
	</view>
	<view class="selectDoctor-content">
		<view class="selectDoctor-title">
			是否指定医师
		</view>
		<view class="selectDoctor-list" @tap="designatedDoctorTab()">
			<view class="selectDoctor-list-left">
				<view class="selectDoctor-list-title">
					指定医师
				</view>
				<view class="selectDoctor-list-des">
					有心仪的医师，直接问
				</view>
			</view>
			<view class="selectDoctor-list-right">
				
				<image :src=' isShowDoctorList ? `${prefix_image}/homepage/IntegralRecord/icon-bottom.png` : `${prefix_image}/homepage/IntegralRecord/icon-right.png` '   mode="aspectFill" />
			</view>
		</view>
		
		<view class="selectDoctor-firstlist-content" v-show="isShowDoctorList">
			<view class="selectDoctor-firstlist-content-list" @tap="gotoFillInformation()"> 
				<view class="selectDoctor-firstlist-content-list-left">
					<image :src="`${prefix_image}/homepage/IntegralRecord/activityCheckInBg.png`" mode="aspectFill" />
				</view>
				<view class="selectDoctor-firstlist-content-list-right">
					<view class="selectDoctor-firstlist-content-list-right-firstView">
						<text class="selectDoctor-firstlist-content-list-right-title">唐俊辉</text>
						<text class="selectDoctor-firstlist-content-list-right-icon">临床经验4年</text>
					</view>
					<view class="selectDoctor-firstlist-content-list-right-profession">执业兽医师</view>
					<view class="selectDoctor-firstlist-content-list-right-des">
						擅长方向：猫科、猫内科、猫行为学、肾病、心脏病、肿瘤、软组织外科、泌尿系统疾病、疑难杂症
					</view>
				</view>
			</view>
			<view class="selectDoctor-firstlist-content-list" @tap="gotoFillInformation()">
				<view class="selectDoctor-firstlist-content-list-left">
					<image :src="`${prefix_image}/homepage/IntegralRecord/activityCheckInBg.png`" mode="aspectFill" />
				</view>
				<view class="selectDoctor-firstlist-content-list-right">
					<view class="selectDoctor-firstlist-content-list-right-firstView">
						<text class="selectDoctor-firstlist-content-list-right-title">唐俊辉</text>
						<text class="selectDoctor-firstlist-content-list-right-icon">临床经验4年</text>
					</view>
					<view class="selectDoctor-firstlist-content-list-right-profession">执业兽医师</view>
					<view class="selectDoctor-firstlist-content-list-right-des">
						擅长方向：猫科、猫内科、猫行为学、肾病、心脏病、肿瘤、软组织外科、泌尿系统疾病、疑难杂症
					</view>
				</view>
			</view>
		</view>
		
		<view class="selectDoctor-list">
			<view class="selectDoctor-list-left">
				<view class="selectDoctor-list-title">
					不指定医师
				</view>
				<view class="selectDoctor-list-des">
					还没想好找谁，等待医师接单问诊
				</view>
			</view>
			<view class="selectDoctor-list-right">
				<image :src="`${prefix_image}/homepage/IntegralRecord/icon-right.png`" mode="aspectFill" />
			</view>
		</view>
	</view>
	
</template>

<script>
import { defineComponent, toRefs, reactive } from "vue"
import config from '@/hooks/useConfig.js'
export default defineComponent({
	props: {
		isOnline: String
	},
	setup(props) {
		const { prefix_image }=config()
		const data = reactive({
			loopData0: [
			  {
			    lanhutext0: '指定医师',
			    lanhutext1: '有心仪的医师，直接问',
			    lanhuimage0:
			      'https://lanhu.oss-cn-beijing.aliyuncs.com/SketchPng0e7f5eaf13ca974acb5b41b68bcd57e62fb37607e2e615c49dc34257c0a660be'
			  },
			  {
			    lanhutext0: '不指定医师',
			    lanhutext1: '还没想好找谁，等待医师接单问诊',
			    lanhuimage0:
			      'https://lanhu.oss-cn-beijing.aliyuncs.com/SketchPng0e7f5eaf13ca974acb5b41b68bcd57e62fb37607e2e615c49dc34257c0a660be'
			  }
			],
			isShowDoctorList: false,
			isOnline: props.isOnline
		})
		// 指定医师tab切换
		const designatedDoctorTab = () => {
			data.isShowDoctorList = !data.isShowDoctorList
		}
		
		// 跳转填写信息
		const gotoFillInformation = () => {
			uni.navigateTo({
				url:`/pages/fillInformation/index?isOnline=${props.isOnline}`,
			})
		}
		return {
			...toRefs(data),
			designatedDoctorTab,
			gotoFillInformation,
			prefix_image
		}
	}
})
</script>

<style lang="stylus" scoped>
	.selectDoctor-Header{
		display: flex;
		justify-content: center;
		padding-top:20rpx;
		box-sizing: border-box;
		background: #F6F6F7;
		image{
			width 687rpx;
			height 508rpx;
		}
	}
	.selectDoctor-firstlist-content-list{
		border-bottom: 0rpx;
	}
	.selectDoctor-content{
		z-index: 2;
		border-radius: 32rpx 32rpx 0 0;
		background-color: rgba(255, 255, 255, 1);
		padding-bottom: 16rpx;
		margin-top: -46rpx;
		padding: 102rpx 32rpx 0rpx 32rpx;
		margin-bottom: 60rpx;
		.selectDoctor-title{
			font-size: 32rpx;
			// font-family: PingFangSC-Semibold, PingFang SC;
			font-weight: 600;
			color: #333333;
			padding-bottom: 36rpx;
		}
	}
	.selectDoctor-list{
		width: 686rpx;
		height: 162rpx;
		background: #F7F7F7;
		border-radius: 16rpx;
		display: flex;
		box-sizing: border-box;
		padding: 32rpx;
		align-items: center;
		margin-top: 24rpx;
		.selectDoctor-list-left{
			flex: 1;
			.selectDoctor-list-title{
				font-size: 32rpx;
				// font-family: PingFangSC-Semibold, PingFang SC;
				font-weight: 600;
				color: #111111;
			}
			.selectDoctor-list-des{
				font-size: 26rpx;
				// font-family: PingFangSC-Regular, PingFang SC;
				font-weight: 400;
				color: #B2B2B2;
				margin-top: 14rpx;
			}
		}
		.selectDoctor-list-right{
			display: flex;
			align-items: center;
			image{
				width: 44rpx;
				height: 44rpx;
			}
		}
	}
	.selectDoctor-firstlist-content{
		.selectDoctor-firstlist-content-list{
			display: flex;
			padding-top: 48rpx;
			padding-bottom: 48rpx;
			border-bottom: 1rpx solid rgba(0, 0, 0, 0.05);
			.selectDoctor-firstlist-content-list-left{
				image{
					width: 90rpx;
					height: 90rpx;
					border-radius: 50%;
				}
			}
			.selectDoctor-firstlist-content-list-right{
				flex: 1;
				padding-left: 20rpx;
			}
			.selectDoctor-firstlist-content-list-right-firstView{
				display: flex;
				align-items: center;
				.selectDoctor-firstlist-content-list-right-title{
					font-size: 32rpx;
					// font-family: PingFangSC-Semibold, PingFang SC;
					font-weight: 600;
					color: #333333;
				}
				.selectDoctor-firstlist-content-list-right-icon{
					width: 144rpx;
					height: 32rpx;
					background: rgba(255,65,60, 0.1);
					border-radius: 4px;
					
					font-size: 22rpx;
					// font-family: PingFangSC-Regular, PingFang SC;
					font-weight: 400;
					color: #FF413C;
					text-align: center;
					line-height: 32rpx;
					margin-left: 20rpx;
				}
			}
			.selectDoctor-firstlist-content-list-right-profession{
				font-size: 24rpx;
				// font-family: PingFangSC-Regular, PingFang SC;
				font-weight: 400;
				color: #333333;
				padding-top: 8rpx;
				padding-bottom: 20rpx;
			}
			.selectDoctor-firstlist-content-list-right-des{
				font-size: 24rpx;
				// font-family: PingFangSC-Regular, PingFang SC;
				font-weight: 400;
				color: #999999;

			}
		}
	}
</style>
